--神之宣告
local shenzhixuangao = fk.CreateSkill {
    name = "mcdh_shenzhixuangao",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

shenzhixuangao:addEffect(fk.TargetConfirmed,{
    can_trigger =  function(self, event, target, player, data)
        return player:hasSkill(self) and (data.card:isCommonTrick() or data.card.type == Card.TypeBasic) and player:getMark("mcdh_ammo") >=1 and (target == player or player:inMyAttackRange(target))
    end,
    on_cost = function(self, event, target, player, data)
        return player.room:askForSkillInvoke(player, self.name, nil, "#mcdh_shenzhixuangao"..":"..data.from.id..":"..target.id..":"..data.card:toLogString())
    end,
    on_use = function(self, event, target, player, data)
        lib.LoseAmmo(player,player,1,self.name)
        table.insertIfNeed(data.nullifiedTargets, target.id)
    end,
})

Fk:loadTranslationTable{
    ["mcdh_shenzhixuangao"] = "神宣",
    [":mcdh_shenzhixuangao"] = "『神之宣告』<br>装填技(1)，你或你攻击范围内的角色成为基本牌或普通锦囊牌的目标后，，你可以令此牌对其无效。",
    ["#mcdh_shenzhixuangao"] = "神宣:令 %src 使用的 %arg 对%dest无效"
}
return shenzhixuangao